package util.designpattern.proxyPattern;

import javax.xml.crypto.Data;
import java.text.SimpleDateFormat;
import java.util.Date;

public class StaticProxyTest {

    public static void main(String[] args)  throws Exception{
        Father father = new Father(new Son());
        father.findLove();

        System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~~~");

        Order order = new Order();
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd");
        Date date = sdf.parse("2020/07/08");
        order.setCreateTime(date.getTime());

        IOrderService orderService = new OrderServicStaticProxy(new OrderService());
        orderService.createOrder(order);

    }
}
